﻿<div ng-controller="ProvideOrderController">
    <div class="row">
        <div class="col-lg-21 col-sm-12 col-xs-12">
            <div class="well with-header" style="padding:20px">
                <div class="header bg-themeprimary">
                    PH Detail
                    <div class="btn-group pull-right">
                    </div>
                </div>
            </div>
                <div class="body">
                    <!-- LIST PROVIDE ORDER -->
                    <div class="row">
                        <div class="col-sm-12" style="padding-left:35px;overflow-y:hidden">
                            <table class="table table-bordered table-striped table-condensed flip-content">
                                <thead class="flip-content bordered-palegreen">
                                    <tr>
                                        <th width="1%">#</th>
                                        <th>Order</th>
                                        <!--<th>User Give</th>-->
                                        <th>User Get</th>
                                        <th>Phone User Get</th>
                                        <th>Email User Get</th>
                                        <th>Amount</th>
                                        <th width="10%">Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ng-repeat="item in ProvideOrderList" ng-show="List.length != 0">
                                        <td class="numeric">{{$index+1}}</td>
                                        <td>
                                            <span ng-if="!item.Status"><a href="#" ng-click="popup('','FormBankDetailModal','BankDetailModalInstanceCtrl','sm',{{item}})">{{item.Id_Order}}</a></span>
                                            <!--<span ng-if="!item.Status"><a href="#" ng-click="doPay(item)">{{item.Id_Order}}</a></span>-->
                                            <span ng-if="item.Status"><a href="#">{{item.Id_Order}}</a></span>
                                        </td>
                                        <!--<td>{{item.UserGive}}</td>-->
                                        <td>{{item.UserGet}}</td>
                                        <td>{{item.PhoneGet}}</td>
                                        <td>{{item.EmailGet}}</td>
                                        <td>{{item.Amount|number}}</td>
                                        <td>
                                            <span ng-if="item.Status==0">Pending</span>
                                            <span ng-if="item.Status==1">Sent</span>
                                            <span ng-if="item.Status==2">Approve</span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                </div>
        </div>
    </div>
    <!--Success Modal Templates-->
    <script type="text/ng-template" id="WarningModal">
        <div class="modal-header">
            <i class="glyphicon glyphicon-warning-sign"></i>
        </div>
        <div class="modal-title">{{title}}</div>
        <div class="modal-body">
            {{ messeger }}
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-success" ng-click="ok()">OK</button>
            <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
        </div>
    </script>
    <script type="text/ng-template" id="FormBankDetailModal">
        <div class="modal-header">
            <strong>Send money to below information</strong>
        </div>
        <div class="modal-body">
            <div class="loginbox">
                <p class="text-danger">{{messeger}}</p>
                <form name="simpleForm" method="post" class="bv-form" novalidate="novalidate">
                    <div class="form-group">
                        <label>Full Name: {{UserInfor.HoTen}}</label>
                    </div>
                    <div class="form-group">
                        <label>Account Number: {{UserInfor.NganHang}}</label>
                    </div>
                    <div class="form-group">
                        <label>Bank: Vietcambank</label>
                    </div>
                    <div class="form-group">
                        <label>Phone Number: {{UserInfor.SDTNHARIENG}}</label>
                    </div>
                </form>
            </div>
        </div>
        <div class="modal-footer">
            <span ng-if="processing" class="text-success"><i class="fa fa-circle-o-notch fa-spin"></i></span>
            <button type="button" class="btn btn-success" ng-click="doSent(item)">Sent</button>
            <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
        </div>
    </script>
</div>
